<%@ page import="entity.Question" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 44814
  Date: 2021/7/3
  Time: 16:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<center>
    <table border="2px" align="center">
        <tr>
            <th>题目编号</th>
            <th>题目内容</th>
            <th>选项A</th>
            <th>选项B</th>
            <th>选项C</th>
            <th>选项D</th>
            <th>正确答案</th>
            <th colspan="2">操作</th>
        </tr>
        <%
            List<Question> questions = (List<Question>) request.getAttribute("questions");
            for (Question question : questions){
        %>
        <tr>
            <td><%=question.getQuestionId()%></td>
            <td><%=question.getTitle()%></td>
            <td><%=question.getOptionA()%></td>
            <td><%=question.getOptionB()%></td>
            <td><%=question.getOptionC()%></td>
            <td><%=question.getOptionD()%></td>
            <td><%=question.getAnswer()%></td>
            <td><a href="/myWeb/question/delete?questionId=<%=question.getQuestionId()%>">删除试题</a></td>
            <td><a href="/myWeb/question/findById?questionId=<%=question.getQuestionId()%>">详细信息</a></td>
        </tr>
        <%
            }
        %>
    </table>
</center>

